package com.jiangyg.devtools.ui.table;

import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import java.io.Serializable;

/**
 * 类描述：列定义
 *
 * @author jiangyg
 * @date 2023-08-27
 */
public class ColumnDefinition implements Serializable {

    /**
     * 标题
     */
    private String title;

    /**
     * 属性名，默认当前属性名
     */
    private String property;

    /**
     * 宽度
     */
    private int width;

    /**
     * 排序
     */
    private int order;

    /**
     * 是否可编辑
     */
    private boolean editable;

    /**
     * 单元格编辑器
     */
    private Class<? extends TableCellEditor> editor;

    /**
     * 单元格渲染器
     */
    private Class<? extends TableCellRenderer> render;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getProperty() {
        return property;
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public boolean isEditable() {
        return editable;
    }

    public void setEditable(boolean editable) {
        this.editable = editable;
    }

    public Class<? extends TableCellEditor> getEditor() {
        return editor;
    }

    public void setEditor(Class<? extends TableCellEditor> editor) {
        this.editor = editor;
    }

    public Class<? extends TableCellRenderer> getRender() {
        return render;
    }

    public void setRender(Class<? extends TableCellRenderer> render) {
        this.render = render;
    }

}
